package com.asseco.mio.codex.controllers;

import com.asseco.mio.Assessments;
import com.asseco.mio.core.webapp.controller.*;
import org.appfuse.service.GenericManager;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/assessments*")
public class AssessmentController {
    private GenericManager<Assessments, Long> assessmentManager;

    @Autowired
    public void setAssessmentsManager(@Qualifier("assessmentManager") GenericManager<Assessments, Long> assessmentManager) {
        this.assessmentManager = assessmentManager;
    }

    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView handleRequest()
    throws Exception {
        return new ModelAndView().addObject(assessmentManager.getAll());
    }
    
    
}
